DoubleClickPositionX/Y is the position in the current line the user double clicked.
NOTE: You must the TextEditor directly at appropriate times in your program. This means you should have modify turned on if the TextEditor gadget is not read only.
TextEditor gadget parameters.
-------------------------
font=GID
This sets the font for the gadget. The GID points to an ALREADY defined text attribute.
arrows (a)
Give the TextEditor a scroll gadget on the right.
readonly (ro)
This gadget is read only.
disable=number (dis=)
The gadget is enabled if number = 0 , disabled if number != 0. Defaults to enabled.
export="num"
Set the export hook for the TextEditor.
num=0 Plain text hook
num=1 EMail hook
import="num"
Set the import hook for the TextEditor.
num=0 Plain text hook
num=1 EMail hook
num=2 Mime hook
num=3 Mime quoted hook
block
The texteditor should mark a block of text as well as generate an event when it is double clicked.
gadgettext="text" (gt=)
Set the text in the gadget.
given.
bindata (bd)
The text will be passed to this pipe in binary after the command line. The gadgettext parameter now gives the length of the data. Setting datain means the data is read from an external file rather than the pipe.
datain="filename" (di=)
Read the data for this gadget from a file.
It is ignored if the Bindata keyword is not present. A length of 0 means to use the complete file.
minwidth=number (minw=)
Set the minimum width for this gadget
minheight=number (minh=)
Set the minimum height for this gadget
weightedwidth=number (weiw=)
Set the weighted width for this gadget
weightedheight=number (weih=)
Set the weighted height for this gadget
nominalsize (noms)
Set this gadget to its nominal size.
replace=GID
Use this gadget to replace an existing gadget specified by GID.
Fixed
Use a fixed font for this TextEditor.
Definition Reply
-----------------
When the gadget creation is successful the pipe replies with
'ok GID'
TextEditor gadget modify parameters.
-------------------------
read
This should not be used with any other parameters. It is ALWAYS responded to with 'SIZE<newline>CHARACTERS'.
SIZE is the number or characters after the newline. The characters are the current contents of the TextEditor gadget.
info
This should not be used with any other parameters. It is ALWAYS responded to with
CURSORX and CURSORY are the current cursor location, BLOCKMARKED=0 if no block is marked, BLOCKMARKED~=0 means a block is currently marked. BSTARTX/Y and BENDX/Y (the start and end of the marked block) are only given if BLOCKMARKED!=0.
update=number
If number=0 then turn off updating of the Texteditor gadget. If number!=0 then turn updating of the gadget back on.
disable=number (dis=)
The gadget is enabled if number = 0 , disabled if number != 0.
readonly=num (ro=)
if num != 0 then this gadget is read only. If num =0 then the gadget is NOT
readonly.
clear
Remove all text from the TextEditor gadget.
CursorY="num" (cy=)
Set the cursor to Y position to num.
Cursorx="num" (cx=)
Set the cursor to Y position to num.
command="string" (cmd=)
Have the TextEditor gadget execute the Arexx command given in string.Command should not be used with other modify parameters.
Command always replies with 'ok SUCCESS [SIZE] <newline>[CHARACTERS]'
if SUCCESS!=0 then the command was handled by the TextEditor, if SUCCESS=0 then the command was not recognised.
If the command succeeds you MUST check to see if SIZE is given. If size is specified you then read SIZE the number or characters after the newline. This is data returned by the command to the TextEditor.
replace
Replace the text highlighted with the text given in gadgettext.
Replace ALWAYS responds with 'RESULT' where result=0 if a marked string is not found, and RESULT !=0 if the replace is successful.
search
Search for the text given in gadgettext.
Search ALWAYS responds with 'RESULT' where result=0 if the search string is not found, and RESULT !=0 if the search string is found.
gadgettext="text" (gt=)
Insert the text in the gadget. OR text to search for if search parameter is specified, OR text to replace highlighted text with if replace is specified.
target="num" (tar=)
If num=0 insert text at start of current contents. If num!=0 then insert text at the cursor position. If target is not specified the text is inserted at the end of the current contents.
If target is not given insert text at cursor position (default).
OR
With search, num is a bit field for search modifiers.
bit 0 (1) search from top
bit 1 (2) search next (default)
bit 2 (4) search case sensitive
bit 3 (8) search dospattern
bit 4 (16) search backwards
Unfortunately this is implemented as a decimal number. See the 'Hints' section for easy ways to handle this.
bindata (bd)
The text will be passed to this pipe in binary after the command line. The gadgettext parameter now gives the length of the data. Note that you can NOT use datain during modify.
Search responds with 'ok RESULT' where result=0 if the search string is not found, and RESULT !=0 if the search string is found.